<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="url" uri="/WEB-INF/tld/stockDetailUrlTag.tld"%>  

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
	<c:set var="ctx" value="${pageContext.request.contextPath}"/>

    <title>股票分红数据</title>

    <!-- Bootstrap Core CSS -->
    <link href="${ctx}/style/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="${ctx}/style/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="${ctx}/style/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="${ctx}/style/bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="${ctx}/style/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="${ctx}/style/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

     <%@ include file="../nav.jsp" %>
        

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">股票分红数据</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
            	 <div class="col-lg-12">
                    <div class="panel panel-default" style="overflow: scroll;">
                        <div class="panel-heading" style="min-width:2000px;">
                            	查询条件
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body" style="min-width:2000px;">
                             <form role="form" action="${ctx}/model/dividend.do">
                                        <div class="form-group">
                                            <span style="float: left;line-height: 36px;margin-right: 10px;font-size: 20px;">股票代码:</span>
                                            <input class="form-control" name="ticker" style="width:10%; float: left; ">
                                            <span style="float: left;line-height: 36px;margin-right: 10px;font-size: 20px;   margin-right: 200px;"></span>
                                           
                                            <span style="float: left;line-height: 36px;margin-right: 10px;font-size: 20px;margin-left:50px; ">期限:</span>
                                            <select name="yearBefore" class="form-control" style="width:10%; float: left;">
												<option value="1">过去一年</option>
												<option value="2">过去两年</option>
												<option value="3">过去三年</option>
												<option value="4">过去四年</option>
												<option value="5">过去五年</option>
												</select>
                                            <span style="line-height: 36px;margin-right: 10px;font-size: 20px;">%</span>
                                        </div>
                                        <div class="form-group">
                                        	<button type="submit" class="btn btn-default">股票查询</button> 
                                        </div>
                                        
                             </form>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
                
                <div class="col-lg-12">
                    <div class="panel panel-default" style="overflow: scroll;">
                        <div class="panel-heading" style="min-width:2000px;">
                            	结果数据
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body" style="min-width:2000px;">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                        	
                                            <th>操作</th>
                                            <th>股票名称</th>
                                            <th>股票代码</th>
                                            <th title="今日上涨率">今日上涨</th>
                                            <th>当前价格</th>
                                            <th>股权登记日</th>
                                             <th>除权除息日</th>
                                              <th>派息日</th>
                                              <th>红股上市日</th>
                                               <th>每股送转</th>
                                            <th>税前分红</th>
                                            <th>税后分红</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach var="stock" items="${dividendList}">
                                        <tr class="odd gradeX" <c:if test="${stock.todayIncrePercent > 0}">style="color:#ff0000"  </c:if>   <c:if test="${stock.todayIncrePercent <= 0}"> style="color:#008000" </c:if>>
                                            <td title="关注"><a href="javascript:void(0)" onClick="addUserStock('${stock.ticker}','${stock.exchangecd}')">关注</a></td>
                                            <td title="总股本： 流通股份： 流通股本： "><a  href=<url:stockDetailUrl ticker="${stock.ticker}"  exchangecd="${stock.exchangecd}"/> target="_blank">${stock.secShortName} </a></td>
                                            <td title="股票代码"><a href=<url:stockDetailUrl ticker="${stock.ticker}"  exchangecd="${stock.exchangecd}"/> target="_blank">${stock.ticker}</a></td>
                                             <td title="税前分红"><fmt:formatNumber value="${stock.todayIncrePercent * 100}"   pattern="0.00" maxFractionDigits="2" />%  </td>
                                             <td title="当前价格"><fmt:formatNumber value="${stock.priceNow}"   pattern="0.00" maxFractionDigits="2" /> </td>
                                            <td title="股权登记日">${stock.recorddate}</td>
                                            <td title="除权除息日">${stock.exdate}  </td>
                                             <td title="派息日">${stock.paydate}</td>
                                            <td title="红股上市日">${stock.divlistdate}</td>
                                            <td title="每股送转">${stock.stkdiv}</td>
                                            <td title="税前分红"><fmt:formatNumber value="${stock.cashdivtax * 100}"   pattern="0.00" maxFractionDigits="2" />%  </td>
                                            <td title="税后分红"><fmt:formatNumber value="${stock.cashdiv * 100}"   pattern="0.00" maxFractionDigits="2" />%  </td>
                                        </tr>
                                     </c:forEach>
                                        
                                    </tbody>
                                </table>
                            </div>
                           
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
           
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="${ctx}/style/bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="${ctx}/style/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="${ctx}/style/bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- DataTables JavaScript -->
    <script src="${ctx}/style/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
    <script src="${ctx}/style/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="${ctx}/style/dist/js/sb-admin-2.js"></script>

	<script src="${ctx}/style/js/refresh-index.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
                responsive: true,
                "order":[[5,"asc"],[3,"desc"]]
        });
    });
    </script>

</body>

</html>
